package ru.niir.goodfil.db.dic;

import ru.niir.goodfil.utils.Pair;

import java.util.ArrayList;
import java.util.List;


public final class ClientState {
    /**
     * Торговый Дом
     */
    public static final int TD = 1;

    /**
     * Официальный дилер
     */
    public static final int AUTORIZED_DEALER_REGION = 2;

    /**
     * Официальный дилер - Москва
     */
    public static final int AUTORIZED_DEALER_MOSCOW = 3;

    /**
     * Интернет-магазин
     */
    public static final int E_SHOP_MOSCOW = 4;

    /**
     * Опт - 1
     */
    public static final int OPT_1 = 5;

    /**
     * Опт - 2
     */
    public static final int OPT_2 = 6;

    /**
     * Опт - 3
     */
    public static final int OPT_3 = 7;

    /**
     * Опт - 4
     */
    public static final int OPT_4 = 8;

    /**
     * Опт - 5
     */
    public static final int OPT_5 = 9;

    /**
     * Магазин - Москва
     */
    public static final int SHOP_MOSCOW = 10;

    /**
     * Магазин - регион
     */
    public static final int SHOP_REGION = 11;

    /**
     * Техцентр москва
     */
    public static final int TECH_CENTER_MOSCOW = 12;

    /**
     * Частное лицо
     */
    public static final int PRIVATE_PERSON = 13;

    /**
     * Интернет-магазин регион
     */
    public static final int E_SHOP_REGION = 14;

    /**
     * Тех-центр регион
     */
    public static final int TECH_CENTER_REGION = 15;

    public static final int EXPRESS_DELIVERY = 16;

    public static final int E_SHOP_DAY_TO_DAY = 17;

    public static final int MSC_CASH_PAY = 18;

    public static String asString(int value) {
        switch (value) {
            case ClientState.TD:
                return "ТД";
            case ClientState.AUTORIZED_DEALER_REGION:
                return "ОД-РЕГ";
            case ClientState.AUTORIZED_DEALER_MOSCOW:
                return "ОД-МСК";
            case ClientState.E_SHOP_MOSCOW:
                return "ИМ - МСК";
            case ClientState.OPT_1:
                return "Опт-1";
            case ClientState.OPT_2:
                return "Опт-2";
            case ClientState.OPT_3:
                return "Опт-3";
            case ClientState.OPT_4:
                return "Опт-4";
            case ClientState.OPT_5:
                return "Опт-5";
            case ClientState.SHOP_MOSCOW:
                return "МАГ-МСК";
            case ClientState.SHOP_REGION:
                return "МАГ-РЕГ";
            case ClientState.TECH_CENTER_MOSCOW:
                return "СТО-МСК";
            case ClientState.PRIVATE_PERSON:
                return "ЧАСТ/Л";
            case ClientState.E_SHOP_REGION:
                return "ИМ-РЕГ";
            case ClientState.TECH_CENTER_REGION:
                return "СТО-РЕГ";
            case ClientState.EXPRESS_DELIVERY:
                return "ЭКСПРЕСС";
            case ClientState.E_SHOP_DAY_TO_DAY:
                return "ИМ-д/д";
            case ClientState.MSC_CASH_PAY:
                return "РАС.ФАКТ";
        }
        return "";
    }

    private static Pair getPair(int value) {
        return new Pair(value, asString(value));
    }

    public static List<Pair> list() {
        return new ArrayList<Pair>() {{
            add(getPair(ClientState.TD));
            add(getPair(ClientState.AUTORIZED_DEALER_REGION));
            add(getPair(ClientState.AUTORIZED_DEALER_MOSCOW));
            add(getPair(ClientState.E_SHOP_MOSCOW));
            add(getPair(ClientState.E_SHOP_REGION));
            add(getPair(ClientState.EXPRESS_DELIVERY));
            add(getPair(ClientState.E_SHOP_DAY_TO_DAY));
            add(getPair(ClientState.OPT_1));
            add(getPair(ClientState.OPT_2));
            add(getPair(ClientState.OPT_3));
            add(getPair(ClientState.OPT_4));
            add(getPair(ClientState.OPT_5));
            add(getPair(ClientState.SHOP_MOSCOW));
            add(getPair(ClientState.SHOP_REGION));
            add(getPair(ClientState.TECH_CENTER_MOSCOW));
            add(getPair(ClientState.TECH_CENTER_REGION));
            add(getPair(ClientState.MSC_CASH_PAY));
            add(getPair(ClientState.PRIVATE_PERSON));
        }};
    }

}
